package org.nViron.nvParams;

/**
 * Manager and generator of visualization parameters
 * @author Roland Haring <p>
 * <script type="text/javascript" src="http://www.ohloh.net/p/376434/widgets/project_basic_stats.js"></script>
 */
public class nvVizParamMgr extends nvParamMgr {
    public enum VIZPARAM {
        INVALID, STRUCTURE, APPERANCE_COLOR_R, APPERANCE_COLOR_G, APPERANCE_COLOR_B, APPERANCE_SHAPE, APPERANCE_CONTOUR,
        METABOLISM, GROWTH, HOMEOSTASIS, RESPONSIVENESS, ADAPTION, MOVEMENT, REPRODUCTION, BIODIVERSITY_L1,
        BIODIVERSITY_L2, BIODIVERSITY_L3, FITNESS, TROPISM
    }

    ;

/*
    // J2ME does not know enum!
    static final int INVALID = -1;
    static final int STRUCTURE = 0;
    static final int APPERANCE_COLOR_R = 1;
    static final int APPERANCE_COLOR_G = 2;
    static final int APPERANCE_COLOR_B = 3;
    static final int APPERANCE_SHAPE = 4;
    static final int APPERANCE_CONTOUR = 5;
    static final int METABOLISM = 6;
    static final int GROWTH = 7;
    static final int HOMEOSTASIS = 8;
    static final int RESPONSIVENESS = 9;
    static final int ADAPTION = 10;
    static final int MOVEMENT = 11;
    static final int REPRODUCTION = 12;
    static final int BIODIVERSITY_L1 = 13;
    static final int BIODIVERSITY_L2 = 14;
    static final int BIODIVERSITY_L3 = 15;
    static final int FITNESS = 16;
    static final int TROPISM = 17;
 */
    public nvVizParamMgr() {
        super();
    }

    @Override
    protected void generateDefaultParams() {
        add(VIZPARAM.STRUCTURE,
            new nvVizParam(VIZPARAM.STRUCTURE, "Structure", "Aggregation of elements to form more complex structures",
                           this));
        add(VIZPARAM.APPERANCE_COLOR_R,
            new nvVizParam(VIZPARAM.APPERANCE_COLOR_R, "Appearance (redish)",
                           "Visual expression of internal state by color red", this));
        add(VIZPARAM.APPERANCE_COLOR_G,
            new nvVizParam(VIZPARAM.APPERANCE_COLOR_G, "Appearance (greenish)",
                           "Visual expression of internal state by color green", this));
        add(VIZPARAM.APPERANCE_COLOR_B,
            new nvVizParam(VIZPARAM.APPERANCE_COLOR_B, "Appearance (bluish)",
                           "Visual expression of internal state by color blue", this));
        add(VIZPARAM.APPERANCE_SHAPE,
            new nvVizParam(VIZPARAM.APPERANCE_SHAPE, "Appearance (Shape)",
                           "Visual expression of internal state by shape", this));
        add(VIZPARAM.APPERANCE_CONTOUR,
            new nvVizParam(VIZPARAM.APPERANCE_CONTOUR, "Appearance (Contour)",
                           "Visual expression of internal state by contour", this));
        add(VIZPARAM.METABOLISM,
            new nvVizParam(VIZPARAM.METABOLISM, "Metabolism", "Synthesis of nutrients for raw materials and fuel",
                           this));
        add(VIZPARAM.GROWTH,
            new nvVizParam(VIZPARAM.GROWTH, "Growth", "An increase in either scale or amount of structure", this));
        add(VIZPARAM.HOMEOSTASIS,
            new nvVizParam(VIZPARAM.HOMEOSTASIS, "Homeostasis", "The maintenance of a balanced internal state", this));
        add(VIZPARAM.RESPONSIVENESS,
            new nvVizParam(VIZPARAM.RESPONSIVENESS, "Responsiveness",
                           "Reaction to stimuli and awareness of the environment", this));
        add(VIZPARAM.ADAPTION,
            new nvVizParam(VIZPARAM.ADAPTION, "Adaptation", "Adjustments to survive in a changing environment", this));
        add(VIZPARAM.MOVEMENT,
            new nvVizParam(VIZPARAM.MOVEMENT, "Movement", "Behavioral expression of internal state", this));
        add(VIZPARAM.REPRODUCTION,
            new nvVizParam(VIZPARAM.REPRODUCTION, "Reproduction",
                           "The ability of entities to create others like itself", this));
        add(VIZPARAM.BIODIVERSITY_L1,
            new nvVizParam(VIZPARAM.BIODIVERSITY_L1, "Biodiversity Level 1",
                           "Variation of life forms within a given ecosystem", this));
        add(VIZPARAM.BIODIVERSITY_L2,
            new nvVizParam(VIZPARAM.BIODIVERSITY_L2, "Biodiversity Level 2",
                           "Variation of life forms within a given ecosystem", this));
        add(VIZPARAM.BIODIVERSITY_L3,
            new nvVizParam(VIZPARAM.BIODIVERSITY_L3, "Biodiversity Level 3",
                           "Variation of life forms within a given ecosystem", this));
        add(VIZPARAM.FITNESS,
            new nvVizParam(VIZPARAM.FITNESS, "Fitness",
                           "Overall parameter related to darwinian fitness describing reproductivity", this));
        add(VIZPARAM.TROPISM,
            new nvVizParam(VIZPARAM.TROPISM, "Tropism",
                           "Indicating growth of a biological organism in response to an environmental stimulus",
                           this));
    }

    public nvVizParam getParam(int index) {
        return (nvVizParam) get(index);
    }

    public nvVizParam getParam(VIZPARAM param) {
        return (nvVizParam) get(param);
    }
}



